package mock.servicesdirectory.organisations.business.businessimpl;

import java.util.List;

import mock.servicesdirectory.common.entities.Team;
import mock.servicesdirectory.organisations.business.businessinterface.TeamBO;
import mock.servicesdirectory.organisations.dao.daointerface.TeamDAO;

public class TeamBOImpl implements TeamBO{
	
	private TeamDAO teamDAO;
	
	public TeamDAO getTeamDAO() {
		return teamDAO;
	}

	public void setTeamDAO(TeamDAO teamDAO) {
		this.teamDAO = teamDAO;
	}

	// Get all Team
	@Override
	public List<Team> getTeam() {
		// TODO Auto-generated method stub
		return teamDAO.getTeam();
	}

	// Get Team of an department
	@Override
	public List<Team> getTeam(int departmentId) {
		// TODO Auto-generated method stub
		return teamDAO.getTeam(departmentId);
	}

	// Filter Team via flag
	@Override
	public List<Team> getTeam(int directorateId, int flag) {
		// TODO Auto-generated method stub
		// Method to get all directorate where name start with a flag
		/*
		 * flag = 1 . Name start with a digit 0-9
		 * flag = 2 . Name start with A, B, C, D ,E
		 * flag = 3 . Name start with F, G, H, I, J
		 * flag = 4 . Name start with K, L, M, N
		 * flag = 5 . Name start with 0, P, Q , R
		 * flag = 6 . Name start with S, T, U , V
		 * flag = 7 . Name start with W, Y, Z
		 */
		// Call TeamDAOImpl.getTeam(flag)
		
		return null;
	}

	// Check exist Team name
	@Override
	public boolean checkExistTeam(String name) {
		// TODO Auto-generated method stub
		// Call TeamDAOImpl.checkExistTeam(name)
		
		return false;
	}	
	// Method to add Team
	public void addTeam(Team team){
		teamDAO.addTeam(team);
	}
}
